package cn.stylefeng.guns.sys.modular.system.entity.Enum;

import lombok.Getter;

/**
 * 审核提交状态枚举类
 *
 */
@Getter
public enum AttendAuditStatusEnum {
    NOT_SUBMIT (0, "未提交"),
    SUBMIT_AUDIT(1, "提交，未审核"),
    SUBMIT_THROUGH(2, "提交，审核通过"),
    SUBMIT_BACK(3, "提交，审核驳回"),
    NOT_CREATE(5, "未创建考勤"),
    NOT_KQDZ(6, "未指定店长");


    AttendAuditStatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;

    private String msg;

    public static AttendAuditStatusEnum getByMsg(String value){
        for(AttendAuditStatusEnum attendAuditStatusEnum : values()){
            if (attendAuditStatusEnum.getMsg().equals(value)) {
                return attendAuditStatusEnum;
            }
        }
        return null;
    }

    public static AttendAuditStatusEnum getByCode(Integer value){
        for(AttendAuditStatusEnum attendAuditStatusEnum : values()){
            if (attendAuditStatusEnum.getCode().equals(value)) {
                return attendAuditStatusEnum;
            }
        }
        return null;
    }

}
